package cn.seecoder.ai.service;

import cn.seecoder.ai.model.vo.PredictionVO;
import org.apache.spark.ml.PipelineModel;
import org.springframework.scheduling.annotation.Async;

import java.util.List;

/**
 * @author fanyanpeng
 * @date 2023/4/21 5:08
 */

public interface PredictionService {


    public List<PredictionVO> getPredictionVOList(Integer userId);

    public List<PredictionVO> getPredictionVOList(Integer userId, Integer modelId);

    public PredictionVO getPredictionVO(Integer userId, Integer predictionId);


    PredictionVO predictAsync(Integer userId, Integer modelId, Integer fileInfoId);

    public void predictWithPipeLineModelAsync(Integer userId,
                                              Integer modelId,
                                              PipelineModel pipelineModel,
                                              Integer fileInfoId,
                                              Integer predictionId);

    PredictionVO predictWithPipeLineModelSync(Integer userId,
                                              Integer modelId,
                                              PipelineModel pipelineModel,
                                              Integer fileInfoId,
                                              Integer predictionId);
}
